<script setup>
import LightHeader from "@/components/LightHeader.vue";
import LightFooter from "@/components/LightFooter.vue";
import { reactive, ref, onMounted } from 'vue';
let selectCpu = (['全部', 'AMD Ryzen EPYC 3.1GHz'])
let selectGpu = (['全部', 'A100-40G-SXM*8', 'AA100-40G-SXM*2'])
let selectMemory = (['全部', '定制', '80G', '160G', '320G', '640G'])
let selectMode = (['全部', '按量付费', '月付', '季付'])
let cpuValue = ref('全部')
let gpuValue = ref('全部')
let memoryValue = ref('全部')
let modeValue = ref('全部')
const options = [
    {
        value: 'Option1',
        label: 'Option1',
    },
]
const active = ref('recommend')
const handleCpu = (item) => {
    cpuValue.value = item
}
const handleGpu = (item) => {
    gpuValue.value = item
}
const handleMemory = (item) => {
    memoryValue.value = item
}
const handleMode = (item) => {
    modeValue.value = item
}
</script>
<template>
    <div class="wrap">
        <!-- 导航栏 -->
        <el-affix :offset="0">
            <LightHeader />
        </el-affix>
        <header>
            <div class="selection">
                <div class="cpuBox">
                    <p class="title">vCPU</p>
                    <div class="content">
                        <div :class="cpuValue == item ? 'ele action' : 'ele'" v-for="(item, index) in selectCpu"
                            :key="index" @click="handleCpu(item)">
                            <p>{{ item }}</p>
                        </div>
                    </div>

                </div>
                <div class="gpuBox">
                    <p class="title">vGPU</p>
                    <div class="content">
                        <div :class="gpuValue == item ? 'ele action' : 'ele'" v-for="(item, index) in selectGpu"
                            :key="index" @click="handleGpu(item)">
                            <p>{{ item }}</p>
                        </div>
                    </div>

                </div>
                <div class="memoryBox">
                    <p class="title">显存</p>
                    <div class="content">
                        <div :class="memoryValue == item ? 'ele action' : 'ele'" v-for="(item, index) in selectMemory"
                            :key="index" @click="handleMemory(item)">
                            <p>{{ item }}</p>
                        </div>
                    </div>

                </div>
                <div class="modeBox">
                    <p class="title">计费模式</p>
                    <div class="content">
                        <div :class="modeValue == item ? 'ele action' : 'ele'" v-for="(item, index) in selectMode"
                            :key="index" @click="handleMode(item)">
                            <p>{{ item }}</p>
                        </div>
                    </div>
                </div>
                <div class="other">
                    <p class="title">其他</p>
                    <div class="content">
                        <div class="selectBox">
                            <el-select v-model="value" placeholder="SSD卡定制" size="small" style="width: 150px">
                                <el-option v-for="item in options" :key="item.value" :label="item.label"
                                    :value="item.value" />
                            </el-select>
                        </div>
                        <div class="selectBox">
                            <el-select v-model="value" placeholder="内存定制" size="small" style="width: 150px">
                                <el-option v-for="item in options" :key="item.value" :label="item.label"
                                    :value="item.value" />
                            </el-select>
                        </div>
                    </div>

                </div>
            </div>
        </header>
        <main>
            <div class="productBox" data-aos="fade-up" data-aos-delay="300">
                <div class="productContent">
                    <div class="tabs">
                        <el-tabs v-model="active" class="demo-tabs" @tab-click="handleClick">
                            <el-tab-pane label="推荐产品" name="recommend"></el-tab-pane>
                            <el-tab-pane label="训练型" name="training"></el-tab-pane>
                            <el-tab-pane label="推理型" name="illation"></el-tab-pane>
                        </el-tabs>
                    </div>
                    <div class="eleBox">
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                        <div class="ele">
                            <div class="top">
                                <p class="title">A100旗舰型40G*8</p>
                                <p class="type">训练型</p>
                            </div>
                            <div class="content">
                                <p>vcpu：AMD Ryzen EPYC 3.1GHz</p>
                                <p>vGPU ：A100-40G-SXM*8</p>
                                <p>显存：320G</p>
                                <p>SSD：定制</p>
                                <p>内存：定制</p>
                                <p>网络流量：赠送电信公网带宽1G</p>
                                <div class="priceBox">
                                    <p class="really">￥120960/月</p>
                                    <p class="false">￥120960/月</p>
                                </div>
                            </div>
                            <div class="buyBtn">
                                立即购买
                            </div>
                        </div>
                    </div>
                    <div class="pagination">
                        <el-pagination background layout="prev, pager, next" :total="1" />
                    </div>

                </div>
                <div class="activityContent">
                    <div class="title">
                        <p>热门活动</p>
                    </div>
                    <div class="activity">
                        <div class="contentBox">
                            <div class="ele">
                                <div class="imgBox">
                                    <img src="@/assets/images/newImg/image6.png" alt="校园+云">
                                </div>
                                <div class="fontBox">
                                    <p>校园+云</p>
                                    <span>校园超值优惠专享套餐</span>
                                </div>
                            </div>
                            <div class="ele">
                                <div class="imgBox">
                                    <img src="@/assets/images/newImg/Group13.png" alt="校园+云">
                                </div>
                                <div class="fontBox">
                                    <p>新客专享</p>
                                    <span>新用户优惠活动福利多多</span>
                                </div>
                            </div>
                            <div class="ele">
                                <div class="imgBox">
                                    <img src="@/assets/images/newImg/image7.png" alt="校园+云">
                                </div>
                                <div class="fontBox">
                                    <p>会员续费优惠活动</p>
                                    <span>会员续费尊享超值折扣服务</span>
                                </div>
                            </div>
                            <div class="ele">
                                <div class="imgBox">
                                    <img src="@/assets/images/newImg/image8.png" alt="校园+云">
                                </div>
                                <div class="fontBox">
                                    <p>你充值，我就送</p>
                                    <span>充值即可送优惠大礼包</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </main>
        <footer>
            <!-- 伙伴入驻 -->
            <div class="join" data-aos="fade-up" data-aos-delay="300">
                <div class="content">
                    <div class="left">
                        <h4>云智算,期待您的加入</h4>
                        <p>让我们共同引领行业创新浪潮，共绘算力时代赢跑蓝图，我们致力于成为超算互联网服务领域的佼佼者</p>
                    </div>
                    <el-button color="#2F54EB">伙伴入驻申请</el-button>
                </div>

            </div>
            <!-- 页脚 -->
            <div class="lightFooter" data-aos="fade-up" data-aos-delay="300">
                <LightFooter></LightFooter>
            </div>
        </footer>
    </div>
</template>


<style lang="scss" scoped>
@media (max-width: 768px) {
    header {
        width: 1400px !important;
    }
    .join{
        width: 1400px !important;
    }
}
.wrap {
    width: 100%;
    background-color: #F7F7F7;

    header {
        width: 100%;
        height: 250px;
        background: url(@/assets/images/newImg/Group3134.png)no-repeat center center/cover;
        overflow: hidden;

        .selection {
            width: 1400px;
            margin: 0 auto;
            margin-top: 20px;

            .cpuBox,
            .gpuBox,
            .memoryBox,
            .modeBox,
            .other {
                display: flex;
                align-items: center;

                .title {
                    width: 80px;
                    font-size: 14px;
                    color: #6D7C90;
                    margin-bottom: 20px;
                }

                .content {
                    margin-left: 50px;
                    display: flex;
                    box-sizing: border-box;

                    .ele {
                        margin-right: 40px;
                        margin-bottom: 15px;
                        border-radius: 5px;
                        padding: 5px;
                        box-sizing: border-box;
                        cursor: pointer;
                    }

                    .action {
                        background-color: #2F54EB;
                        color: #fff;
                    }

                    .ele:hover {
                        background-color: #2F54EB;
                        color: #fff;
                    }

                    .selectBox {
                        margin-right: 40px;
                    }
                }

            }
        }
    }

    main {
        width: 100%;
        margin: 20px 0;

        .productBox {
            width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;

            .productContent {
                width: 1105px;

                .tabs {
                    background-color: #fff;

                    ::v-deep .el-tabs__nav-wrap,
                    .is-top {
                        // display: flex;
                        // justify-content: center;

                        .el-tabs__nav,
                        .is-top {
                            width: 500px;
                            justify-content: space-around;
                        }

                        .el-tabs__nav-wrap::after {
                            background-color: transparent !important;
                        }
                    }

                    ::v-deep .el-tabs__header,
                    .is-top {
                        margin: 0;
                    }
                }

                .eleBox {
                    margin-top: 10px;
                    width: 100%;
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: space-between;

                    .ele {
                        width: 355px;
                        margin-bottom: 20px;
                        padding-top: 20px;
                        box-sizing: border-box;
                        background-color: #fff;
                        box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.05);

                        .top {
                            display: flex;
                            align-items: center;
                            justify-content: space-between;
                            padding: 0 23px;
                            box-sizing: border-box;

                            .title {
                                font-size: 18px;
                                font-weight: 600;
                            }

                            .type {
                                border: 1px solid #2F54EB;
                                padding: 0 10px;
                                color: #2F54EB;
                                box-sizing: border-box;
                                font-size: 12px;
                                line-height: 20px;
                            }

                            .types {
                                border: 1px solid #13C2C2;
                                color: #13C2C2;
                            }
                        }

                        .content {
                            margin-top: 20px;
                            padding-left: 23px;

                            p {
                                font-size: 14px;
                                color: #576373;
                                margin-bottom: 15px;
                            }

                            .priceBox {
                                display: flex;
                                align-items: center;

                                .really {
                                    color: red;
                                    font-weight: 600;
                                    font-size: 18px;
                                    margin-right: 30px;
                                }

                                .false {
                                    color: #99A3B1;
                                    text-decoration: line-through;
                                }
                            }
                        }

                        .buyBtn {
                            height: 50px;
                            background-color: #fff;
                            color: #2F54EB;
                            font-weight: 600;
                            font-size: 18px;
                            text-align: center;
                            line-height: 50px;
                            border-top: 1px solid #E2E5E9;
                            cursor: pointer;
                        }

                        .buyBtn:hover {
                            background-color: #2F54EB;
                            color: #fff;
                        }
                    }
                }

                .pagination {
                    background-color: #fff;
                    padding: 10px 0 10px 10px;
                    box-sizing: border-box;

                    ::v-deep .is-active {
                        background-color: #2F54EB;
                    }
                }

            }

            .activityContent {
                width: 275px;
                height: 600px;

                .title {
                    background-color: #fff;
                    height: 40px;
                    line-height: 40px;
                    padding-left: 20px;
                    box-sizing: border-box;
                    font-weight: 600;
                }

                .activity {
                    margin-top: 10px;
                    background-color: #fff;
                    height: 1066px;

                    .contentBox {
                        padding: 0 10px;
                        box-sizing: border-box;

                        .ele {
                            display: flex;
                            align-items: center;
                            line-height: 30px;
                            height: 140px;

                            p {
                                font-weight: 600;
                            }

                            span {
                                font-size: 14px;
                                font-weight: 400;
                            }
                        }

                        .ele:hover {
                            background: url(@/assets/images/newImg/Frame55.png)no-repeat center center/cover;
                            transition: all 0.6s;
                        }
                    }

                }

            }

        }
    }

    footer {
        width: 100%;

        .join {
            width: 100%;
            padding: 60px 0;
            box-sizing: border-box;
            background: url(@/assets/images/newImg/Frame26.png)no-repeat center center/cover;

            // background-size: 100%;
            .content {
                width: 1400px;
                margin: 0 auto;
                display: flex;
                justify-content: space-between;
                align-items: center;

                .left {
                    h4 {
                        font-weight: 600;
                        font-size: 28px;
                        margin-bottom: 40px;
                    }

                    p {
                        font-size: 14px;
                        color: #414A56;
                        line-height: 24px;
                    }
                }

                button {
                    background: linear-gradient(to right, #2F59EA, #2BC2C2);
                    border: none;
                }
            }

        }
    }
}
</style>